import request from '@/utils/request'

// 查询资金池列表
export function listPool(query) {
  return request({
    url: '/training/pool/getList',
    method: 'get',
    params: query
  })
}

// 查询资金池详细
export function getPool(fundPoolId) {
  return request({
    url: '/training/pool/' + fundPoolId,
    method: 'get'
  })
}

// 新增资金池 
export function addPool(data) {
  return request({
    url: '/training/pool',
    method: 'post',
    data: data
  })
}

// 修改资金池
export function updatePool(data) {
  return request({
    url: '/training/pool',
    method: 'put',
    data: data
  })
}

// 删除资金池
export function delPool(fundPoolId) {
  return request({
    url: '/training/pool/' + fundPoolId,
    method: 'delete'
  })
}


// 出账
export function disbursement(data) {
  return request({
    url: '/training/pool/disbursement',
    method: 'put',
    data: data
  })
}

//逻辑删除
export function removeFundPool(fundPoolIds) {
  return request({
    url: '/training/pool/removeFundPool/' + fundPoolIds,
    method: 'put',
  })
}

//资金池--出账回显查询
export function getFundPoolCorrelationInfo(fundPoolId) {
  return request({
    url: '/training/pool/getFundPoolCorrelationInfo/' + fundPoolId,
    method: 'get',
  })
}